﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnovTech.Util.Persistence
{

    //CRUD
    public interface IDao<TEntity, TID> where TEntity : IEntity<TID>
    {
        void Save(TEntity obj);
        void Delete(TEntity obj);
        TEntity Get(TID id);
        IEnumerable<TEntity> List(Func<TEntity, bool> predicate);
    }

    public interface IDao
    {
        void Save(params object[] obj);
        void Delete(params object[] obj);
        T Get<T>(object id);
        IEnumerable<T> List<T>(Func<T, bool> predicate);
    }
}
